As Internet spreads and the technology becomes matured, it is possible to transmit facsimile information over Internet; therefore, techniques related with facsimile over IP, i.e., network facsimile emerge as the times require. Real-time T.38 facsimile over IP is a facsimile over IP technique that behaves well against packet loss and jitter, and is widely used in NGN. The architecture of real-time T.38 facsimile system is shown in FIG. 1. In the real-time facsimile over IP system, two terminal facsimile machines 1 and 2 communicate with each other in real time in T.30 protocol; in facsimile communication each time, the two facsimile machines perform signaling interaction or sending and receiving of messages; when the data modulated and transmitted by either of the facsimile machines passes through the gateway, the gateway demodulates the modulated signals and encapsulates the demodulated data into T.38-compliant IP packets, and then sends the packets to the opposite gateway via the IP network; the opposite gateway abstracts the data from the IP packets, modulates the data, and then sends the modulated data to the opposite facsimile machine.
Common facsimile machines usually support sending messages of facsimile pages at the modulation/demodulation rate specified in ITU-T V.27ter/V.29/V.17 protocol. In T.30 protocol, the facsimile process is divided into 5 stages, wherein stage B is a procedure before sending message for negotiation and training of facsimile capability, as shown in FIG. 2: the called transmitter, i.e., the called facsimile machine, sends its DIS (DIS, Digital Identification Signal, sent by the facsimile receiver) and possible CSI (Called Subscriber Identification) or NSF (Non-standard Facilities Frame), which indicates some attributes of facsimile operation are not specified in ITU standard; though the attributes are coded in FIFO, the coding mode is not specified) signal; when receiving the signal, the calling transmitter, i.e., the calling facsimile machine, feeds back a DCS (Digital Command Signal), which provides information related with rate of the modulator, image width, image code, and page length, and may contain TSI (Transmitting subscriber identification) signal containing its phone number or NSS (Non-Standard Setup) signal that responds to the NSF frame, and then the calling facsimile machine sends a TCF signal; when receiving the TCF (Training Check Field) signal, the called transmitter feeds back a CFR (Confirmation to Receive) signal.
In stage B of the facsimile process, as shown in FIG. 2, the TCF signal includes full zero data modulated and transmitted specified in ITU-T V.27ter/V.29/V.17 protocol; other signals, such as (NSF) (CSI) DIS, (TSI) DCS, CFR, are all frames in HDLC format transmitted and received at the rate and in the modulation mode specified in ITU-T V.21 protocol. The HDLC frame format of a V.21 signal is shown in FIG. 3.
In addition, the T.38 IFP (Internet Facsimile Protocol) packet of a complete V.21 frame includes: V.21 flag packet, i.e., T30-ind, which is a flag packet created for the flag sequence before the frame data; V.21 frame data packets, i.e., hdlc-data, which are created for the frame data from the address field to FCS (Frame Check Sequence) and may be multiple packets; FCS check result data packet, i.e., hdlc-fcs-ok if the data received and demodulated by the gateway is correct, or hdlc-fcs-bad if wrong; V.21 frame end packet, i.e., sig-end, which indicates the energy of V.21 frame signal received and demodulated by the gateway disappears.
After the called facsimile machine enters into stage B, it transmits a (NSF) (CSI) DIS signal actively, wherein NSF and CSI are optimal, the data bits in which carries performance parameters of the facsimile machine, including the modulation/demodulation protocols, coding format, and ECM mode, etc., supported by the facsimile machine in the message transmission stage. When the calling facsimile machine receives the DIS, it will negotiate with the called facsimile machine to determine the capability parameters supported by both parties in accordance with the capability information of the called facsimile machine carried in the DIS in combination with its own capability, and then sends the capability parameters to the called facsimile machine through a DCS. The called facsimile machine will determine the data rate for channel training and demodulation and receiving of facsimile page data in accordance with the capability parameters in the DCS.
In real-time T.38 facsimile over IP, when the DCS passes through the gateways, both the sending gateway and the receiving gateway will abstract the parameters in the DCS, so as to accomplish modulation/demodulation of TCF data and message data. Since the DCS is a standard frame specified in T.30 protocol, which means each bit in the data field in the DCS is specified in this protocol, the gateway can abstract the parameters from DCS and parse out information such as rate, etc.
As specified in T.30 protocol, in stage B, the facsimile machines can also negotiate parameters (e.g., rate) by means of signals such as NSF/NSS, etc. The process of rate negotiation by means of NSF signals in stage B is shown in FIG. 4. After the called facsimile machine enters into stage B, it transmits a NSF/(CSI)/DIS, wherein CSI is optional. The data field in NSF contains country code of the facsimile machine manufacturer, manufacturer code, model number of the facsimile machine, and mode in which the rate parameter is carried, etc.; when the calling facsimile machine receives the NSF signal and if the calling facsimile machine complies with the called facsimile machine manufacturer's proprietary specification, it will returns a NSS signal carrying the negotiation result: rate, whether support ECM mode, etc.; the subsequent process, i.e., the calling facsimile machine sends a TCF signal and the called facsimile machine transmits a CFR signal when receiving the TCF signal, is identical to the process for standard frames. However, in the case of network facsimile via T.38 gateways, since NSF and NSS are in the proprietary format specified by the facsimile machine manufacturer, T.38 gateways are unable to abstract the parameters required for modulation/demodulation; as a result, in the case that non-standard frames are used, the facsimile process will surely fail.
Therefore, in the prior art, the gateways have to determine V.21 frames received and demodulated at TDM (Time Division Multiplexing) side and V.21 frames received at IP side; if an NSF is received at TDM side, as shown in FIG. 5, the NSF will be discarded, i.e., the gateway will not encapsulate the NSF data into packets or send the packets to IP side. In this way, if the receiving facsimile machine sends a NSF/(CSI)/DIS, the signal that reaches actually to the transmitting facsimile machine will be only the (CSI)/DIS signal because the NSF is discarded by the gateway; and the transmitting facsimile machine will return a standard frame (TSI)/DCS as specified in T.30 protocol; wherein the DCS carries information including modulation/demodulation rate and ECM mode, etc.
If an NSF frame signal is received at IP side, as shown in FIG. 6, the gateway will discard the NSF frame signal, i.e., it does not modulate the frame data and send to the transmitting facsimile machine, but continue to receive subsequent (CSI)/DIS frames at IP side, and modulate and transmit the (CSI)/DIS frames normally.
In above solution, though in general cases that the gateways discard NSF signals so as to render the facsimile machines to carry rate information through DCS, however, the solution has the following disadvantages:
T.30 protocol specifies: before one V.21 frame or multiple consecutive V.21 frames are transmitted, a flag sequence (i.e., “0×7e” modulated in V.21 format) of 1s±15% length must be transmitted, and any frame with delay in receiving or detection longer than 3.45 s shall be discarded.
As shown in FIG. 7, since the gateways will discard NSF frame, the transmitting gateway begins to modulate and send 0x7e once it receives the first flag (0x 7e) in the preamble sequence, till it receives a subsequent DIS frame; in this way, the receiving facsimile machine will deem the DIS as the first frame signal and all previous “0x7e” as belonging to the preamble sequence. However, some facsimile machines start timing once they receive the first “0x7e” and will deem the receiving command as failed if the receiving of DIS does not finish within 3.45 s.
Furthermore, the gateways are in voice state initially, which switch to facsimile state only when they detect the characteristic signal of facsimile, CED or V.21 flag (preamble code of (NSF)/DIS).
In actual application of gateways, there are often cases that the gateways switch at a low speed or the receiving gateway fails to detect facsimile events; in these cases, since intervention of NSF signals by T.38 gateways is only applicable to T.38 facsimile state, NSF signals may be transmitted transparently (in voice state) to the transmitting facsimile machine, as shown in FIG. 8; the transmitting facsimile machine complying with the proprietary specifications will respond with a NSS signal, and thus the rate negotiation is still performed with proprietary frames; as a result, after the gateway switches to T.38 facsimile state, it is unable to abstract the rate parameter, resulting in facsimile failure.
Therefore, the prior art has disadvantages to some extent and shall be improved.